list1 = [20,7,1,8,6,3]
print(list1)
target = 9
dict1 = {}
for i in range(0,len(list1)):
    if target-list1[i] in dict1:
        print(dict1[target-list1[i]],i)
        break
    else:
        dict1[list1[i]] = i
        print(dict1)
